INCLUDES=-I. -I../SFont $(shell sdl-config --cflags)
CFLAGS+= -ggdb $(INCLUDES) -O3 -ffast-math
LIBS=$(LDFLAGS) -L../SDL_Layer -lSDL_image -lSDL_layer $(shell sdl-config --libs)
COMPILER=$(shell which g++)
MAKEDEPEND=$(shell which makedepend)

SRCS=$(shell find . -maxdepth 1 -name "*.cc")
INCS=$(shell find . -maxdepth 1 -name "*.h")
OBJS=$(SRCS:.cc=.o)

.SUFFIXES: .o .cc

all: bnb editor

editor:
	\cd editor && $(MAKE) all

bnb: $(OBJS)
	$(COMPILER) -o bnb $(LIBS) $(OBJS)

.cc.o: 
	$(COMPILER) $(CFLAGS) -c $<

clean:
	\rm -f *.o bnb *~* *#*
	\cd editor && $(MAKE) clean

.PHONY: all bnb clean editor

depend:
	$(MAKEDEPEND) -- -I. -I../SFont -- $(SRCS) 2>/dev/null

#sinclude "Makefile.depend"

# DO NOT DELETE

./BootStrap.o: BootStrap.h GameComponent.h SplashScreen.h MenuScreen.h
./BootStrap.o: QuitScreen.h Halt.h
./GameComponent.o: GameComponent.h GameController.h
./GameController.o: GameController.h GameComponent.h
./GameSettings.o: GameSettings.h /usr/include/stdio.h /usr/include/_types.h
./GameSettings.o: /usr/include/sys/_types.h /usr/include/sys/cdefs.h
./GameSettings.o: /usr/include/machine/_types.h /usr/include/ppc/_types.h
./Gfx.o: Gfx.h SDL_Layer.h
./GfxEffects.o: GfxEffects.h Gfx.h SDL_Layer.h Timer.h
./Halt.o: Halt.h GameComponent.h ResourceMgr.h SFont.h GameController.h Gfx.h
./Halt.o: SDL_Layer.h /usr/include/stdlib.h /usr/include/available.h
./Halt.o: /usr/include/_types.h /usr/include/sys/_types.h
./Halt.o: /usr/include/sys/cdefs.h /usr/include/machine/_types.h
./Halt.o: /usr/include/ppc/_types.h /usr/include/sys/wait.h
./Halt.o: /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h
./Halt.o: /usr/include/machine/signal.h /usr/include/ppc/signal.h
./Halt.o: /usr/include/ppc/_structs.h /usr/include/sys/_structs.h
./Halt.o: /usr/include/machine/_structs.h /usr/include/sys/resource.h
./Halt.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h
./Halt.o: /usr/include/sys/_endian.h /usr/include/alloca.h
./Halt.o: /usr/include/machine/types.h /usr/include/ppc/types.h
./main.o: Gfx.h SDL_Layer.h GameController.h BootStrap.h GameComponent.h
./main.o: ResourceMgr.h SFont.h /usr/include/time.h /usr/include/_types.h
./main.o: /usr/include/sys/_types.h /usr/include/sys/cdefs.h
./main.o: /usr/include/machine/_types.h /usr/include/ppc/_types.h
./main.o: /usr/include/_structs.h /usr/include/sys/_structs.h
./main.o: /usr/include/machine/_structs.h /usr/include/ppc/_structs.h
./main.o: /usr/include/stdlib.h /usr/include/available.h
./main.o: /usr/include/sys/wait.h /usr/include/sys/signal.h
./main.o: /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h
./main.o: /usr/include/ppc/signal.h /usr/include/sys/resource.h
./main.o: /usr/include/machine/endian.h /usr/include/ppc/endian.h
./main.o: /usr/include/sys/_endian.h /usr/include/alloca.h
./main.o: /usr/include/machine/types.h /usr/include/ppc/types.h
./MenuScreen.o: MenuScreen.h GameComponent.h Gfx.h SDL_Layer.h GfxEffects.h
./MenuScreen.o: ResourceMgr.h SFont.h GameSettings.h TreeNode.h
./MenuScreen.o: /usr/include/ctype.h /usr/include/runetype.h
./MenuScreen.o: /usr/include/_types.h /usr/include/sys/_types.h
./MenuScreen.o: /usr/include/sys/cdefs.h /usr/include/machine/_types.h
./MenuScreen.o: /usr/include/ppc/_types.h Timer.h QuitScreen.h Utils.h
./MenuScreen.o: Pixel.h
./Pixel.o: Pixel.h
./QuitScreen.o: QuitScreen.h GameComponent.h Gfx.h SDL_Layer.h ResourceMgr.h
./QuitScreen.o: SFont.h GfxEffects.h
./ResourceMgr.o: ResourceMgr.h SFont.h
./SFont.o: /usr/include/assert.h /usr/include/sys/cdefs.h
./SFont.o: /usr/include/stdlib.h /usr/include/available.h
./SFont.o: /usr/include/_types.h /usr/include/sys/_types.h
./SFont.o: /usr/include/machine/_types.h /usr/include/ppc/_types.h
./SFont.o: /usr/include/sys/wait.h /usr/include/sys/signal.h
./SFont.o: /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h
./SFont.o: /usr/include/ppc/signal.h /usr/include/ppc/_structs.h
./SFont.o: /usr/include/sys/_structs.h /usr/include/machine/_structs.h
./SFont.o: /usr/include/sys/resource.h /usr/include/machine/endian.h
./SFont.o: /usr/include/ppc/endian.h /usr/include/sys/_endian.h
./SFont.o: /usr/include/alloca.h /usr/include/machine/types.h
./SFont.o: /usr/include/ppc/types.h SFont.h
./SplashScreen.o: SplashScreen.h GameComponent.h Gfx.h SDL_Layer.h
./SplashScreen.o: ResourceMgr.h SFont.h GfxEffects.h
./Timer.o: Timer.h
./TreeNode.o: TreeNode.h ResourceMgr.h SFont.h GameComponent.h MenuScreen.h
./TreeNode.o: /usr/include/ctype.h /usr/include/runetype.h
./TreeNode.o: /usr/include/_types.h /usr/include/sys/_types.h
./TreeNode.o: /usr/include/sys/cdefs.h /usr/include/machine/_types.h
./TreeNode.o: /usr/include/ppc/_types.h Gfx.h SDL_Layer.h
./Utils.o: Utils.h
